//import CryptoJS from CryptoJS
// by walkingsky

var CryptoJS = require("crypto-js");

function decode(access_token){
    var parsedWordArray = CryptoJS.enc.Base64.parse(access_token);
    //console.log(parsedWordArray);
    var parsedStr = parsedWordArray.toString(CryptoJS.enc.Utf8);
    console.log(parsedStr);
    tokenBytes=CryptoJS.AES.decrypt(parsedStr, "h9zvh6szfeuwnhlg14i");
    tokenStr=tokenBytes.toString(CryptoJS.enc.Utf8);
    console.log(tokenStr);
    return tokenStr;
}

decode('VTJGc2RHVmtYMStKZWZIUzVBVXd1VU1OOHM5MU9hVkFlcjl6VmhUTFg3QzVCV1RRbXFXb3JDUmdaaUpaaVU5ODZSSFhVbFFsa1VZK1ZBOERrc0FidXc9PQ==');
